﻿#region License statement
// NJamb, a specification and delta-specification DSL
// Copyright (c) 2010-2011, Mark Knell
// Published under the MIT License; all other rights reserved
#endregion

#region using...
using System;
using System.Linq.Expressions;
using NJamb.Parser.SubjectBuilders;
using NUnit.Framework;
using Stile.Testing.SampleTypes;
#endregion

namespace NJamb.Tests
{
    [TestFixture]
    public class SpecifyFixture
    {
        [Test]
        public void For()
        {
            // arrange
            var sample = new Sample();
            Expression<Func<Sample>> expression = () => sample;

            // act
            var subjectBuilder = Specify.For(expression) as SubjectBuilder<Sample>;

            // assert
            Assert.IsNotNull(subjectBuilder);
            Assert.That(subjectBuilder.Expression, Is.SameAs(expression));
        }
    }
}
